<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class StoreOrder extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $table='store_order';
    protected $guarded=[];

    /**
     * User: YKY
     * DateTime: 2022/11/18 20:01
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function getGoods(){
        return $this->hasOne(StoreGoods::class,'id','goods_id');
    }

    public function getStatus(){
        return $this->hasMany(OrderTab::class,'id','status');
    }
}
